Package-level declarations

Types

Link copied to clipboard
@Serializable
data class CompressedAttributesDoc(val encoding: String? = null, val attributes: List<String> = emptyList())

Compressed-buffer descriptor; encoding is "draco" in every known package.

Link copied to clipboard
@Serializable
data class GeometryBufferDoc(val compressedAttributes: CompressedAttributesDoc? = null)

One storage form of a geometry: uncompressed SoA when compressedAttributes is null.

Link copied to clipboard
@Serializable
data class GeometryDefDoc(val geometryBuffers: List<GeometryBufferDoc> = emptyList())
Link copied to clipboard
@Serializable
data class HeightModelInfoDoc(val heightModel: String? = null, val vertCRS: String? = null, val heightUnit: String? = null)

heightModelInfo: heightModel is "gravity_related_height" (orthometric/MSL) or "ellipsoidal" — the spec defines no default; vertCRS names the datum ("EGM96_height"); heightUnit scales z values, see heightUnitToMeters.

Link copied to clipboard
@Serializable
data class HrefDoc(val href: String? = null)
Link copied to clipboard
class I3sAttribute(val name: String, val type: I3sValueType, val componentsPerVertex: Int)

One attribute block in an I3S geometry buffer.

Link copied to clipboard

Transcodes an I3S node's default (uncompressed) geometry buffer to a GltfModel so the existing 3D-Tiles mesh pipeline consumes it unchanged (the JIT "I3S→glTF" strategy CesiumJS uses).

Link copied to clipboard
class I3sGeometrySchema(val headerFields: List<Pair<String, I3sValueType>>, val vertexOrdering: List<I3sAttribute>, val featureOrdering: List<I3sAttribute>)

Binary layout of an I3S default geometry buffer: integer headerFields, then each vertexOrdering attribute as one contiguous vertexCount-long block, then each featureOrdering attribute as one featureCount-long block. DEFAULT is the common Esri schema.

Link copied to clipboard

DTOs + decoders for the I3S documents a tile tree is built from: 3dSceneLayer.json and node pages (nodepages/{n}.json). Scope: I3S 1.7+ compact form (node pages) for the hierarchy; legacy 1.6 per-node 3dNodeIndexDocuments are consulted only for texture names when a package omits textureSetDefinitions. Only consumed fields are modelled; unknown keys ignored.

Link copied to clipboard

Primitive value types used by I3S geometry/feature attributes, with their byte width.

Link copied to clipboard
fun interface I3sVertexMapper

Maps a raw I3S vertex (Δlon°, Δlat°, Δheight relative to the node origin) to a local Cartesian offset from the tile origin, written into out[offset..offset+2]. Backed by the real projection so tiles share a consistent curved surface (no tangent-plane seams). Δheight arrives in the layer's declared height unit; applying heightUnitToMeters is the mapper's job.

Link copied to clipboard

Web Mercator (EPSG:3857) support for projected-CRS I3S layers: detection plus the spherical metre↔degree conversions the standard defines. Projected packages store OBB centers and vertex offsets in Mercator metres; x is linear in longitude while y needs the exact inverse projection (linearizing y across a node drifts tens of centimetres at mid latitudes).

Link copied to clipboard
@Serializable
data class MaterialDefDoc(val pbrMetallicRoughness: PbrMetallicRoughnessDoc? = null)
Link copied to clipboard
@Serializable
data class MeshDoc(val geometry: MeshGeometryDoc? = null, val material: MeshMaterialDoc? = null, val attribute: MeshResourceRef? = null)

Mesh resource references for a node.

Link copied to clipboard
@Serializable
data class MeshGeometryDoc(val definition: Int = 0, val resource: Int = -1, val vertexCount: Int = 0, val featureCount: Int = 0)
Link copied to clipboard
@Serializable
data class MeshMaterialDoc(val definition: Int = -1, val resource: Int = -1, val texelCountHint: Int = 0)
Link copied to clipboard
@Serializable
data class MeshResourceRef(val resource: Int = -1)
Link copied to clipboard
@Serializable
data class NodeDoc(val index: Int = -1, val parentIndex: Int = -1, val lodThreshold: Double = 0.0, val obb: ObbDoc? = null, val children: List<Int> = emptyList(), val mesh: MeshDoc? = null)

One node within a page.

Link copied to clipboard
@Serializable
data class NodeIndexDoc(val textureData: List<HrefDoc> = emptyList())

Legacy per-node 3dNodeIndexDocument.json — only the texture href is consumed.

Link copied to clipboard
@Serializable
data class NodePageDoc(val nodes: List<NodeDoc> = emptyList())

One nodepages/{n}.json file: a flattened slice of the node tree.

Link copied to clipboard
@Serializable
data class NodePagesDoc(val nodesPerPage: Int = 64, val lodSelectionMetricType: String? = null)

Node-page pagination + LoD metric config.

Link copied to clipboard
@Serializable
data class ObbDoc(val center: List<Double> = emptyList(), val halfSize: List<Double> = emptyList(), val quaternion: List<Double> = emptyList())

Oriented bounding box. center is [x, y, height] in the layer's horizontal CRS — geographic [longitude°, latitude°] for 4326, metres for Web Mercator; halfSize is CRS-unit metres in the box's local frame; quaternion is [x, y, z, w].

Link copied to clipboard
@Serializable
data class PbrMetallicRoughnessDoc(val baseColorTexture: TextureReferenceDoc? = null)
Link copied to clipboard
@Serializable
data class SceneLayerDoc(val id: Int? = null, val version: String? = null, val name: String? = null, val layerType: String? = null, val spatialReference: SpatialReferenceDoc? = null, val heightModelInfo: HeightModelInfoDoc? = null, val store: StoreDoc = StoreDoc(), val materialDefinitions: List<MaterialDefDoc> = emptyList(), val textureSetDefinitions: List<TextureSetDefDoc> = emptyList(), val geometryDefinitions: List<GeometryDefDoc> = emptyList())

Root 3dSceneLayer.json document.

Link copied to clipboard

SLPK (I3S Scene Layer Package) container reader — the shared ReadOnlyArchive, aliased to keep an SLPK-flavoured name at the I3S call sites.

Link copied to clipboard
@Serializable
data class SpatialReferenceDoc(val wkid: Int = 0, val latestWkid: Int = 0, val vcsWkid: Int = 0, val latestVcsWkid: Int = 0, val wkt: String? = null)
Link copied to clipboard
@Serializable
data class StoreDoc(val rootNode: String? = null, val version: String? = null, val indexCRS: String? = null, val vertexCRS: String? = null, val nodePages: NodePagesDoc? = null)

Physical-storage descriptor.

Link copied to clipboard
@Serializable
data class TextureFormatDoc(val name: String? = null, val format: String? = null)

One texture-set encoding: name under nodes/{res}/textures/, format = jpg|png|dds|ktx2.

Link copied to clipboard
@Serializable
data class TextureReferenceDoc(val textureSetDefinitionId: Int = -1)
Link copied to clipboard
@Serializable
data class TextureSetDefDoc(val formats: List<TextureFormatDoc> = emptyList())

Functions

Link copied to clipboard

Metres per heightModelInfo.heightUnit — the scale every z value in the package needs to reach the engine's metres. Applies to OBB centre heights and vertex z offsets, not to obb.halfSize, which the spec fixes in metres. Unset or unrecognised means metres; "meter" is what ArcGIS writes, the rest of the enum comes from surveyed data in legacy units.

Link copied to clipboard

A vertical CRS wkid is gravity-related unless it falls in the Esri block defining ellipsoidal height per datum (115700 = WGS_1984, 115702 = NAD_1983, …). Every EPSG vertical CRS is gravity-related (3855 = EGM2008, 5703 = NAVD88, 5714 = MSL, 5773 = EGM96), as is the Esri 1057xx block (105700 = WGS_1984_Geoid).

Link copied to clipboard

Heights are orthometric (gravity-related/MSL), so an ellipsoid-datum consumer must add the geoid undulation. Sources in declaration-strength order: heightModelInfo.heightModel, the vertical CRS wkid, an embedded VERTCS/VERTCRS in spatialReference.wkt, then the vertCRS name. Nothing declared means ellipsoidal (HAE), matching how a package without a vertical CRS reads. The undulation applied downstream is always EGM96, so an EGM2008/NAVD88 package lands within the sub-metre difference between those geoids.